<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>组合选择器</title>
    <!--内联式-->
    <style>
        /* 后代选择器 (空格) */
        #div1 div{
            color: red;
        }
        /* 子选择器 (>) */
        #div1 > div{
            border: 2px solid green;
        }
        /* 相邻兄弟选择器 (+)*/
        #div1 + div{
            font-size: 30px;
        }
    </style>
</head>
<body>
<div id="div1">div1
    <div>div2
        <div>div5</div>
        <span>span1</span>
    </div>
    <div>div3
        <span>span2</span>
        <span>span3</span>
    </div>
    <div>div4</div>
</div>
<div>div6</div>
<div>div7</div>
</body>
</html>